import { http } from './service.js'

export const getAppList = () => {
	return http.request({
		url: '/api/xj_target/app_list',
		method: 'POST',
	})
}

// 巡检对象列表
export const getXjTargetClass = (params) => {
	return http.request({
		url: '/api/xj_target_class/list',
		method: 'GET',
		params: params,
	})
}

// 巡检对象 检查目录
export const getXjTargetProject = (targetClassId) => {
	return http.request({
		url: '/api/xj_target/app_class_list',
		method: 'POST',
		params: {
			'classId': targetClassId,
		}
	})
}
// 巡检对象 检查项目
export const getXjProjectItem = (targetId) => {
	return http.request({
		url: '/api/xj_target/app_project',
		method: 'POST',
		params: {
			'targetId': targetId,
		}
	})
}
// 添加记录
export const addRecord = (targetRecord) => {
	return http.request({
		url: '/api/xj_target_record/add_record',
		method: 'POST',
		data: targetRecord
	})
}

//通过 巡检类别 查 巡检位置 检查列表
export const getTargetCensus = (params) => {
	return http.request({
		url: '/api/xj_target_record/census',
		method: 'POST',
		params: params
	})
}


export const getTargetRecord = (targetRecordId) => {
	return http.request({
		url: '/api/xj_target_record/details',
		method: 'POST',
		params: {
			'targetRecordId': targetRecordId
		}
	})
}

export const getTargetStatus = (params) => {
	return http.request({
		url: '/api/xj_target_record/target_status',
		method: 'POST',
		params
	})
}

export const getAllArea = (params) => {
	return http.request({
		url: '/web/teaching_area/page_by_area',
		method: 'POST',
		params
	})
}

export const addSterilization = (params) => {
	return http.request({
		url: '/api/sterilization/record',
		method: 'POST',
		params: params
	})
}


